<?php
session_start();
include_once 'config.php';

if (isset($_POST['added'])) {
    add_societe();
    echo '<a href="/">Back</a>';
} else {
?>
<form method="post" action="add-societe.php">
    <input type="hidden" name="added" value="1"/>
    <div class="row">
        <label for="nom">Nom</label>
        <input name="nom" id="nom"/>
    </div>
    <div class="row">
        <label for="siret">Siret</label>
        <input name="siret" id="siret"/>
    </div>
    <div class="row">
        <label for="adress">Adress</label>
        <input name="adress" id="adress"/>
    </div>
    <input type="submit" value="Save"/>
</form>
<?php
}
